package com.etoak.service.impl;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class test {

    public static void main(String[] args) {
        HashMap<Integer, String> map = new HashMap<>();
        map.put(1,"王乐君");
        map.put(2,"张晓冬");
        map.put(3,"李金鹏");
        Set<Integer> keys = map.keySet();
        Collection<String> values = map.values();
        Set<Map.Entry<Integer,String>> set = map.entrySet();

        System.out.println(keys);
        System.out.println(values);
        for(Map.Entry<Integer,String> entry : set){
            System.out.println(entry.getKey());
            System.out.println(entry.getValue());
        }

    }
}
